package com.exartisan.util;

import android.app.AlertDialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;

import com.exartisan.thanhdoanhn.R;

public class DialogCommentUtil
{
private static AlertDialog dialog;

	/**
	 * @author VanVD
	 * Show dialog to post comment on feed events
	 * @param context
	 */
	public static void showDialogComment(final Context context, final OnCommentDialogClickListener listener)
	{
		
		// get prompts.xml view
		LayoutInflater li = LayoutInflater.from(context);
		View promptsView = li.inflate(R.layout.popup_list_survey, null);

		AlertDialog.Builder commentBuilder = new AlertDialog.Builder(context);
		
		// set prompts.xml to alertdialog builder
		commentBuilder.setView(promptsView);

		final ListView lv = (ListView) promptsView
				.findViewById(R.id.lv_popupSurvey);

		
		// set dialog message
//		commentBuilder
//				.setCancelable(false)
//				.setPositiveButton("OK", new DialogInterface.OnClickListener()
//				{
//					public void onClick(DialogInterface dialog, int id)
//					{
//						// get user input and set it to result
//						// edit text
//						Toast.makeText(context, "Thanks for your comment",
//								Toast.LENGTH_SHORT).show();
//					}
//				})
//				.setNegativeButton("Cancel",
//						new DialogInterface.OnClickListener()
//						{
//							public void onClick(DialogInterface dialog, int id)
//							{
//								dialog.cancel();
//							}
//						});

		// create alert dialog
		AlertDialog alertDialog = commentBuilder.create();
		dialog = alertDialog;

		// show it
		alertDialog.show();
	}
	
}
